package com.lys.emsystem.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lys.emsystem.entity.ChartData;
import com.lys.emsystem.entity.Student;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lys.emsystem.vo.StudentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liyansheng
 * @since 2022-04-26
 */
@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    IPage<Student> search(Page<Student> page, @Param("studentVo") StudentVo studentVo);

    Student getStudentById(@Param("id") Integer id);

    List<ChartData> selectStudentSexCount(@Param("userId") Integer userId);

    List<ChartData> selectStudentProvince(@Param("userId") Integer userId);
}
